package com.ruoyi.web.controller.inv;

import com.ruoyi.buy.domain.entity.Inv0004.Inv0004ExcuteInVO;
import com.ruoyi.buy.domain.entity.Inv0004.Inv0004ViewByIdVO;
import com.ruoyi.buy.domain.entity.PO.BuyPurchasePost;
import com.ruoyi.buy.service.IInv0004Service;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 库存信息Controller
 * 
 * @author ruoyi
 * @date 2023-12-18
 */
@RestController
@RequestMapping("/inv/inv0004")
public class Inv0004Controller extends BaseController
{
    @Autowired
    private IInv0004Service iInv0004Service;

    @PostMapping("/viewById")
    public AjaxResult viewById(@RequestBody BuyPurchasePost para)
    {
        Inv0004ViewByIdVO result = iInv0004Service.viewById(para);
        return success(result);
    }

    @PostMapping("/arrivalComfirm")
    public AjaxResult arrivalComfirm(@RequestBody BuyPurchasePost para){
        return toAjax(iInv0004Service.arrivalComfirm(para));
    }

    @PostMapping("/executeIn")
    public AjaxResult executeIn(@RequestBody Inv0004ExcuteInVO para) throws Exception {
        return toAjax(iInv0004Service.executeIn(para));
    }

    @PostMapping("/viewRKBillById")
    public AjaxResult viewRKBillById(@RequestBody BuyPurchasePost para) throws Exception {
        return success(iInv0004Service.viewRKBillById(para));
    }
}
